<template>
	<view>
		<uni-list>
			<uni-list-item v-for="(item,index) in list" :key="index" :to="item.url" :title="item.name"
				:showArrow="true"></uni-list-item>
			<!-- <uni-list-item  title="素材库" :showArrow="true"></uni-list-item> -->
		</uni-list>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
				list1: [ //AI素材库
					{
						name: '一键去水印',
						url: '/pages/material/index'
					},
					{
						name: '素材库',
						url: '/pages/material/material'
					}
				],
				list2: [ //视频创作
					{
						name: '一键生成',
						url: '/pages/videoProdue/createList'
					},
					{
						name: '高级混剪',
						url: '/pages/videoProdue/advanseList'
					},
					{
						name: '视频库',
						url: '/pages/videoProdue/videoList'
					},
					{
						name: '视频分组',
						url: '/pages/videoProdue/group/group'
					}
				],
				list3: [ //蓝V授权
					{
						name: '企业号授权',
						url: '/pages/companyVip/impower'
					},
					{
						name: '管理意向客户',
						url: '/pages/companyVip/manage/manage'
					},
					{
						name: '互动私信',
						url: '/pages/companyVip/letter'
					}
				],
				list4: [ //员工号授权
					{
						name: '员工账号授权',
						url: '/pages/employee/impower'
					},
					{
						name: '员工账号分组',
						url: '/pages/employee/group'
					}
				],
				list5: [ //视频管理
					{
						name: '员工视频发布',
						url: '/pages/videoManage/index'
					},
					{
						name: '视频定时发布',
						url: '/pages/videoManage/timePublish'
					},
					{
						name: '员工视频评论管理',
						url: '/pages/videoManage/comment'
					}
				],
				list6: [ //公域转私域
					{
						name: '抖音私信加微信',
						url: '/pages/private/index'
					}
				],
				list7: [ //排名
					{
						name: '员工实时排名',
						url: '/pages/rank/rank'
					},
					{
						name: '员工排名查询',
						url: '/pages/rank/search'
					},
					{
						name: '员工排名明细',
						url: '/pages/rank/detail'
					}
				],
				list8: [ //关键词管理
					{
						name: '话题设置',
						url: '/pages/topic/index'
					},
					{
						name: '话题库',
						url: '/pages/topic/list'
					},
					{
						name: '话题分组',
						url: '/pages/topic/group'
					},
				],
				list9: [ //爆店码
					{
						name: '活动列表',
						url: '/pages/activity/list'
					},
					{
						name: '客户发布列表',
						url: '/pages/activity/sendList'
					},
					{
						name: '优惠卷',
						url: '/pages/activity/coupon'
					},
				]
			};
		},
		onLoad(option) {
			uni.setNavigationBarTitle({
				title: option.name
			})
			if (option.type == 1) {
				this.list = this.list1
			}
			if (option.type == 2) {
				this.list = this.list2
			}
			if (option.type == 3) {
				this.list = this.list3
			}
			if (option.type == 4) {
				this.list = this.list4
			}
			if (option.type == 5) {
				this.list = this.list5
			}
			if (option.type == 6) {
				this.list = this.list6
			}
			if (option.type == 7) {
				this.list = this.list7
			}
			if (option.type == 8) {
				this.list = this.list8
			}
			if (option.type == 9) {
				this.list = this.list9
			}
		},
		methods: {
			toUrl(u) {
				console.log(u)
				uni.navigateTo({
					url: u
				})
			}
		}
	}
</script>

<style lang="scss">

</style>